import baseService from '../baseService/index.js'

// 注册用户
const registerAccountApi = async (params) => {
    return await baseService.post("/register", params)
}

// 查询用户信息
const searchUserInfoApi = async () => {
    return await baseService.post("/searchUserInfo")
}

// 查找用户的随机问题
const searchUserRandomQuestionApi = async (params) => {
    return await baseService.post("/searchUserRandomQuestion", params)
}

// 找回密码
const findpasswordApi = async (params) => {
    return await baseService.post("/findPassword", params)
}

// 查询角色信息
const searchRoleListApi = async () => {
    return  baseService.post("/searchRoleList")
}

//用户绑定角色
const bindRoleApi = async (params) => {
    return  await baseService.post('/bindRole', params)
}

// 新增用户的第一个计划
const addFirstPlanApi = async (params) => {
    return  await baseService.post("/addFirstPlan", params)
}

// 新增用户的自定义角色
const addRoleMessageApi = async (params) => {
    return  await baseService.post('/addRoleMessage', params)
}

export {
    registerAccountApi,
    searchUserInfoApi,
    searchUserRandomQuestionApi,
    findpasswordApi,
    searchRoleListApi,
    bindRoleApi,
    addFirstPlanApi,
    addRoleMessageApi
}